package com.example.demo.config;

import com.example.demo.entity.Person;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(prefix = "filter", name = "loginFilter", havingValue = "true", matchIfMissing = true)
public class ConditionalOnPropertyLearn {
    @Bean
    public Person getDataSource() {
        return new Person("", 22);
    }
}
